package machines

import (
	"cloud_android_backend/pkg/models/resources"
	"github.com/golang/glog"
	"modules.tenxcloud.com/common/composite"
)

func CreateMachine(machine *resources.Machines) error {
	db, err := composite.Database.GetOrm()
	if err != nil {
		glog.Errorf("GetOrm error: %v", err)
		return err
	}
	return machine.CreateOrUpdate(db)

}
